import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Dem01 {
    public static void main(String[] args) {
        String regex = "\\d+";
        Pattern pattern = Pattern.compile(regex);
        String text  = "hello 123456 word";
        Matcher matcher = pattern.matcher(text);
        while (matcher.find()){
            System.out.println(text + "匹配结果是：" + matcher.group());
        }
    }

}
